/**
 * 
 * @author Eliran
 * @param x is the x coordinates on an address
 * @param y is the y coordinates of an address
 * 
 * Address class represents an address 
 */

public class Address {
	
	private double x;
	private double y;
	
	public Address(double x1, double y1) {
		x = x1;
		y = y1;
	}
	
	/**
	 * 
	 * @param a represents a given address to calculate the distance
	 * @return the absolute oclidian distance between two points
	 */
	public double caclDistance(Address a) {
		double deltaX = a.getXCoor() - x;
		double deltaY = a.getYCoor() - y;
		return Math.abs(deltaY/deltaX);
	}
	
	/**
	 * 
	 * @return x coordinate of this address
	 */
	public double getXCoor() {
		return x;
	}
	
	/**
	 * 
	 * @return y coordinate of this address
	 */
	public double getYCoor() {
		return y;
	}
	
	public String toString(){
		return "{"+x+","+y+"}";
	}
}
